package com.example.base.net

import com.blankj.utilcode.util.SPUtils
import okhttp3.Interceptor
import okhttp3.Response

/**
 * 请求头拦截器---OKHttp
 *
 */
class HeaderInterceptor:Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val token = SPUtils.getInstance().getString("token")
        val request = chain.request().newBuilder().addHeader("Authori-zation",token).build()
        return chain.proceed(request)
    }
}